<?php if(empty($grupos)):?>
<h1>No existe datos todavia</h1>
<?php else:?>
<div class="grid_8">
<div class="box">
	<div class="header">
		<img src="img/icons/packs/fugue/16x16/shadeless/table-excel.png" width="16" height="16">
	<h3>Grupos</h3><span></span>
	</div>
</div>
<div class="content">
	<table class="table" id="table-example">
	<thead>
		<tr>
		<th>#</th>
		<th>Grupo</th>
        <th>Descripci&oacute;n</th>
		<th>Accion</th>
	    </tr>
	</thead>
	<tbody>
	<?php foreach($grupos as $grupo):?>
		<tr>
			<td><?php echo $grupo['Grupo']['id'];?></td>
			<td><?php echo $grupo['Grupo']['nombre']?></td>
			<td><?php echo $grupo['Grupo']['descripcion']?></td>
			<td>
            <?php 
              echo $this->Html->link(
              $this->Html->image("icons/packs/diagona/16x16/018.png", array("alt" => "Editar", 'title'=>'editar grupo')),
              array('action'=>"editar",$grupo['Grupo']['id']),
              array('escape' => false)
              );
              ?>&nbsp;
             <?php echo $this->Html->link(
              $this->Html->image("icons/packs/fugue/16x16/animal-dog.png", array("alt"=>"eliminar", 'title'=>'razas')),
              array('action'=>"editaraza",$grupo['Grupo']['id'], $grupo['Grupo']['nombre']),
              array('escape' => false)
              ); ?>
              <?php echo $this->Html->link(
              $this->Html->image("cross.png", array("alt"=>"razas", 'title'=>'eliminar grupo')),
              array('action'=>"eliminar",$grupo['Grupo']['id']),
              array('escape' => false), 
              ("Desea eliminar realmente??")
              ); ?>&nbsp;
            </td>
		</tr>
	<?php endforeach;?>	
	</tbody>   
	</table>
	
</div>
</div>
<?php endif;?>
<div class="grid_4">
			<?php echo $this->element('menu_grupos') ?>
</div> <!-- End of .grid_4 -->
<div class="clear"></div>	
</div>

<script>
			$(window).load(function() {
				$('#table-example').dataTable();
				$(window).resize();
			});
</script>